//
//  DeployManager.swift
//  DMRCommonBaseLib
//
//  Created by edy on 2025/11/6.
//

import Foundation

public struct DeployItemModel<ItemType> {
    
    public var title = ""
    public var subTitle = ""
    
    public var iconImageName = ""
    public var highlightIconImageName = ""
    
    public var type: ItemType
    
    public init(type: ItemType) {
        self.type = type
    }
    
}


open class DeployManager<ItemType> {
    
    // 获取配置数据
//    public func loadDeploys<ItemType>() -> [DeployItemModel<ItemType>] {
//        return []
//    }
    
    // 通过配置项获取DeviceDeploys数组
    open func loadDeployItemList(itemTypeList: [ItemType]) -> [DeployItemModel<ItemType>] {
        var source = [DeployItemModel<ItemType>]()
        
        itemTypeList.forEach { iType in
            let iItem = getDeployItem(iType)
            source.append(iItem)
        }
        
        return source
    }
    
    open func getDeployItem(_ itemType: ItemType) -> DeployItemModel<ItemType> {
        let item = DeployItemModel(type: itemType)

//        switch type {
//        case .remoteFitting:
//            item.title = "远程验配"
//            item.iconImageName = "service_remote_fitting_icon"
//
//        case .fittingRecord:
//            item.title = "验配记录"
//            item.iconImageName = "service_fitting_record_icon"
//            
//        case .useGuide:
//            item.title = "用户指南"
//            item.iconImageName = "service_use_guide_icon"
//            
//        case .hearingKnowledge:
//            item.title = "听力科普"
//            item.iconImageName = "service_hearing_knowledge_icon"
//            
//        case .speechTransriber:
//            item.title = "语音字幕"
//            item.iconImageName = "service_speech_transriber_icon"
//            
//        case .speechRehabilitation:
//            item.title = "言语康复"
//            item.iconImageName = "service_speech_rehabilitation_icon"
//        }
        
        return item
    }
    
}
